// ts 增强了class类

export {};

interface Option {
  name: string;
}

// interface PersonInterface {
//   name: string;
//   getName: Function;
//   setName: Function;
//   constructor: Function;
// }

class Person {
  name: string = "张三";
  constructor(option: Option) {
    this.name = option.name;
  }
  getName() {
    return this.name;
  }
  setName(name: string) {
    this.name = name;
  }
}

let person = new Person({
  name: "李四",
});

console.log(person.getName);
